import 'auth_3rd_type.dart';

// 第三方登录 Name
class Auth3rdName {
  String? givenName;
  String? familyName;

  Auth3rdName({this.givenName, this.familyName});

  Map<String, dynamic> toMap() {
    return {
      'givenName': givenName,
      'familyName': familyName,
    };
  }
}

// 第三方登录信息模型
class Auth3rdModel {
  String? uid;
  String? token;
  String? email;
  String? nickName;
  String? phone;
  String? avatar;
  Auth3rdName? name;
  // 第三方登录类型
  Auth3rdType? auth3rdType;

  Auth3rdModel({
    this.uid,
    this.token,
    this.email,
    this.nickName,
    this.phone,
    this.avatar,
    this.name,
  });

  Map<String, dynamic> toMap() {
    return {
      'uid': uid,
      'token': token,
      'email': email,
      'nickName': nickName,
      'phone': phone,
      'avatar': avatar,
      if (name != null) 'name': name?.toMap(),
    };
  }
}
